import {useSelector} from "react-redux";
import {StateType} from "../store";
import {UserStateType} from "../store/userRreducer";

function useGetUserInfo() {
    const {username, nickname} = useSelector<StateType>((state: any) => state.user) as UserStateType
    return {username, nickname}
}

export default useGetUserInfo